# Generated manually

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='DataStats',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('period', models.SmallIntegerField(choices=[(1, '日统计'), (2, '周统计'), (3, '月统计')], verbose_name='统计周期')),
                ('stats_type', models.SmallIntegerField(choices=[(1, '业务指标'), (2, '合规指标'), (3, '互动指标')], verbose_name='统计类型')),
                ('stats_date', models.DateField(verbose_name='统计日期（日/周日/月初）')),
                ('business_data', models.JSONField(default=dict, verbose_name='业务指标数据')),
                ('compliance_data', models.JSONField(default=dict, verbose_name='合规指标数据')),
                ('interaction_data', models.JSONField(default=dict, verbose_name='互动指标数据')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '数据统计结果',
                'verbose_name_plural': '数据统计结果',
                'db_table': 'data_stats',
            },
        ),
        migrations.AddIndex(
            model_name='datastats',
            index=models.Index(fields=['period', 'stats_date'], name='data_stats_period_4a8b2d_idx'),
        ),
        migrations.AddIndex(
            model_name='datastats',
            index=models.Index(fields=['stats_type', 'stats_date'], name='data_stats_stats_t_8c9f3a_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='datastats',
            unique_together={('period', 'stats_type', 'stats_date')},
        ),
    ]

